package pr.codegen;

public class PrPathesConstant {
    // task 的目录
    public String packageName;
    public String servicePackageName;
    public String businessName;
    public String domaainPackage;
    public String mapperPackage;
    public String requestPackage;
    public String responsePackage;

    public String rootPath;
    public String servicePath;
    public String serviceImplPath;
    public String mapperPath;
    public String mapperXmlPath;
    public String domainPath;
    public String responsePath;
    public String requestPath;

    public boolean genController;
    public boolean genService;
    public boolean genMapper;
    public boolean genRequest;
    public boolean genResponse;

    public String vmPath;

    public PrPathesConstant(String packageName, String businessName, String rootPath, String fileTmpPath) {
        // task 的目录
        this.packageName = packageName;
        this.servicePackageName = packageName + "." + businessName;

        this.businessName = businessName;
        this.domaainPackage = packageName + "." + businessName + ".domain";
        this.mapperPackage = packageName + "." + businessName + ".mapper";
        this.requestPackage = domaainPackage + ".request";
        this.responsePackage = domaainPackage + ".response";

        this.rootPath = rootPath;
        this.servicePath = rootPath + "/"  + businessName + "/service";
        this.serviceImplPath = servicePath + "/impl";
        this.mapperPath = rootPath + "/"  + businessName + "/mapper";


        this.mapperXmlPath = rootPath.substring(0, rootPath.indexOf("/java")) + "/resources/mapper/"  + businessName;
        this.domainPath = rootPath + "/"  + businessName + "/domain";
        this.responsePath = domainPath + "/response";
        this.requestPath = domainPath + "/request";

//        this.genController = true;
        this.genService = true;
        this.genMapper = true;
//        this.genRequest = true;
//        this.genResponse = true;


        this.vmPath = fileTmpPath;
    }

}